import Http from '../utils/request'

class smsService extends Http{
    getSmsCapacity=()=>{
        return this.get('/busitype/getSmsConfParam')
    }
    updateSmsCapacity=(capacity,endTime,arriveTime)=>{
        return this.post(`/busitype/updateSmsConfParam/${capacity}/${endTime}/${arriveTime}`)
    }

    sendIdentify=(phoneNo)=>{

        const phoneNum = this.trim(phoneNo)
        return this.postForm('/sms/send_identify',{phoneNo:phoneNum})
    }
    trim=(str)=>{
        return str.replace(/^(\s|\u00A0)+/, '').replace(/(\s|\u00A0)+$/, '');
    }
}

export default new smsService();
